<template>
    <div class="layui-card">
        <div class="layui-card-header"><%= cardName %></div>
        <div class="layui-card-body" style="padding: 15px;">
            <!--&&htmlchildren&&-->
        </div>
    </div>
</template>
<script name="compile">
    function templateCompile(data) {
        var defaultData = {
            type: "module",
        };
        var newData = Object.assign(defaultData, data);
        var callback = {
            success: true,
            result: newData
        };
        if (!data.cardName) {
            return {
                success: false,
                result: "card模板缺少参数：cardName"
            };
        }
        return callback;
    }
</script>
<script name="templateScript">
    //&&scriptchildren&&
</script>